# -*- coding: utf-8 -*-

from scaws import AWS
from scdb import DB01,DB_AWS

DATA_PATH = 'data'
PREPARE_FOR_DIRS = ['log']

CFG = {
    'sleep_time': 6,
    'run_sleep_time': 3,
    # 'force_run_once': True,
    # 's3_bucket': 'c-news',
    'components': [
        {
            'name': 'conveyor',
            'class_name': 'scpy2.components.aws_sqs.Sqs',
            'cfg': {
                'aws': AWS,
                # 'queue_used_for_receive': 'smoke_test_task',
                # 'receive_s3_enabled': False,
                'queue_used_for_send': 'resume_task',
                'allow_create': True,
                'queue_attributes': {
                    'DelaySeconds': '5'
                }
            }
        },
        {
            'name': 'sqlexecutor',
            'class_name': 'scpy2.components.pgsql.PostgreSQL',
            'cfg': {
                'conn_args': DB_AWS
            }
        },
    ],
    # 'crawl_processors': {
    #     'toutiao': 'toutiao_news.TouTiaoNews',
    # }
}